/**
 * @author luguoxiang
 * @date 2022/7/5
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
import { createApi, request } from '@/soar';

export const basePath = '/system/menu';
export const subject = '菜单';
const api = createApi(basePath, subject);

export default {
  ...api,
  /**
   * 清空缓存
   */
  clearCache: () => request.post(`${basePath}/clear-cache`),
  /**
   * 获取树形结构数据
   */
  tree: () => request.get(`${basePath}/tree`),
  /**
   * 批量创建
   * @param data
   */
  batchCreate: (data: any) => request.post(`${basePath}/batchCreate`, { data }),
};
